﻿/******************************************************************************
 * Main.c
 *
 * Copyright (C) 2017  WANG YIFU
 *
 * Auther: Wang Yifu
 * E-mail: 340064514@qq.com
 *
 * Note: Some initializations and the main loop.
 *
 ******************************************************************************/

#include "Includes.h"


UINT8 bzmha[96] = {
    0x40,0x02,0x50,0x09,0xDF,0x04,0x55,0x05,
    0x75,0x0A,0xD5,0x0F,0x55,0x02,0x75,0x05,
    0xD5,0x04,0x5F,0x09,0x50,0x02,0x40,0x02,

    0x10,0x08,0x14,0x04,0xD4,0x03,0x14,0x02,
    0x14,0x04,0xFF,0x07,0x94,0x08,0x94,0x08,
    0x94,0x08,0xD6,0x08,0x94,0x08,0x10,0x08,

    0x84,0x00,0x89,0x0F,0x72,0x00,0x00,0x08,
    0x70,0x09,0x5F,0x0B,0x75,0x05,0x55,0x05,
    0x75,0x0D,0x5F,0x0B,0x70,0x09,0x00,0x08,

    0x02,0x00,0xF2,0x0F,0x02,0x04,0xFA,0x05,
    0x2A,0x05,0xFA,0x05,0x2A,0x05,0x2A,0x05,
    0xFA,0x05,0x02,0x04,0xF3,0x0F,0x02,0x00
};

int main(void)
{
    unsigned char i;

    LED_DisplayInit();
    Sim_Init();

//    for (i = 0; i < 48; i++) {
//        LedDisplay.curFrameBuf->buf[i] = (UINT16)bzmha[i * 2 + 1] * 256 + bzmha[i * 2];
//        LedDisplay.curFrameBuf->buf[i] = 0x0FFF;
//    }

    while (LedSimDat.simRunFlag) {
        LED_Process();
    }

    endwin();
    return 0;
}
